package com.dq.Week2.day09.dict;

public class Dog {
    private String name;
    private int age;
    private int appetite;

    public Dog(){}

    public Dog(String name, int age, int appetite) {
        this.name = name;
        this.age = age;
        this.appetite = appetite;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getAppetite() {
        return appetite;
    }

    public void setAppetite(int appetite) {
        this.appetite = appetite;
    }


    @Override
    public boolean equals(Object another)
    {
        if(this==another)
        {
            return true;
        }
        if(another instanceof Dog)
        {
            Dog dog = (Dog)another;
            if(this.getAge()==((Dog) another).getAge() && this.getName()==((Dog) another).getName()&&this.getAppetite()==((Dog) another).getAppetite())
            {
                return true;

            }
        }
        return false;
    }
}
